package HomeWork;

import java.util.Random;

public class homework04 {
    public static void main(String[] args) {
        System.out.println(getPassword());

    }

    public static String getPassword() {
        StringBuilder sb = new StringBuilder();
        for (char i = 'a'; i <= 'z'; i++) {
            sb.append(i);
        }
        for (char i = 'A'; i <= 'z'; i++) {
            sb.append(i);
        }
        for (int i = 0; i < 10; i++) {
            sb.append(i);
        }
        Random ra = new Random();
        String index = "";
        for (int i = 0; i < 4; i++) {
            int pw = ra.nextInt(sb.length());
            index += sb.charAt(pw);
        }
        return index;
    }
}
